#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include <QString>
#include <QMouseEvent>
#include <QPropertyAnimation>
namespace Ui {
class BtForm;
}

class BtForm : public QWidget
{
    Q_OBJECT

public:
    explicit BtForm(QWidget *parent = nullptr);
    ~BtForm();

    // 设置图标 ⽂字 id
    void seticon(QString btIcon,QString content,int mid);

    void clearBg(); // 清除上⼀次按钮点击留下的样式

    void clearlinebox();

    int getid();

    void showAnimal(bool isshow);  //显示动画

protected:
    void mousePressEvent(QMouseEvent *event);

signals:
    void click(int id);

private:
    Ui::BtForm *ui;
public:
    int id = 0;     // 按钮id：该按钮对应的page⻚

    QPropertyAnimation *line1Animal;
    QPropertyAnimation *line2Animal;
    QPropertyAnimation *line3Animal;
    QPropertyAnimation *line4Animal;
};

#endif // BTFORM_H
